package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.GysGroupAddDTO;
import org.jsola.hr.dto.GysGroupUpdateDTO;
import org.jsola.hr.query.GysGroupQuery;
import org.jsola.hr.vo.GysGroupListVO;
import org.jsola.hr.vo.GysGroupVO;

import java.util.List;

/**
 * 甲方端供应商分组
 *
 * @author zhr
 */
@Api(tags = "hr-甲方端供应商分组")
public interface IGysGroupControllerAPI {

    /**
     * 新增甲方端供应商分组
     *
     * @param gysGroupAddDTO 甲方端供应商分组新增实体
     * @return 甲方端供应商分组展示对象
     */
    @ApiOperation(value = "新增甲方端供应商分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupAddDTO", dataType = "GysGroupAddDTO", value = "新增甲方端供应商分组", paramType = "body")
    })
    Result<GysGroupVO> save(GysGroupAddDTO gysGroupAddDTO);


    /**
     * 修改甲方端供应商分组
     *
     * @param gysGroupUpdateDTO 甲方端供应商分组
     * @return 更新数量
     */
    @ApiOperation(value = "修改甲方端供应商分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupUpdateDTO", dataType = "GysGroupUpdateDTO", value = "修改甲方端供应商分组", paramType = "body")
    })
    Result<Integer> update(GysGroupUpdateDTO gysGroupUpdateDTO);


    /**
     * 删除单个甲方端供应商分组，彻底删除
     *
     * @param gysGroupId 甲方端供应商分组id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个甲方端供应商分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupId", dataType = "String", value = "甲方端供应商分组id", paramType = "path")
    })
    Result<Integer> delete(String gysGroupId);


    /**
     * 批量删除甲方端供应商分组，彻底删除
     *
     * @param gysGroupIds 甲方端供应商分组id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除甲方端供应商分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupIds", dataType = "String[]", value = "甲方端供应商分组id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] gysGroupIds);


    /**
     * 根据甲方端供应商分组id查询甲方端供应商分组详情
     *
     * @param gysGroupId 甲方端供应商分组id
     * @return 甲方端供应商分组详情
     */
    @ApiOperation(value = "根据甲方端供应商分组id查询甲方端供应商分组详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupId", dataType = "String", value = "甲方端供应商分组id", paramType = "path")
    })
    Result<GysGroupVO> findById(String gysGroupId);


    /**
     * 查询甲方端供应商分组
     *
     * @param gysGroupQuery 甲方端供应商分组查询参数
     * @return page
     */
    @ApiOperation(value = "查询甲方端供应商分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupQuery", dataType = "GysGroupQuery", value = "甲方端供应商分组查询参数", paramType = "query")
    })
    Result<List<GysGroupListVO>> listAll(GysGroupQuery gysGroupQuery);


    /**
     * 分页查询甲方端供应商分组
     *
     * @param gysGroupQuery 甲方端供应商分组查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询甲方端供应商分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupQuery", dataType = "GysGroupQuery", value = "甲方端供应商分组查询参数", paramType = "query")
    })
    Result<Page<GysGroupListVO>> page(GysGroupQuery gysGroupQuery);

    /**
     * 查询供应商分组树
     *
     * @param gysGroupQuery 查询参数
     * @return 供应商分组树
     */
    @ApiOperation(value = "查询供应商分组树")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gysGroupQuery", dataType = "GysGroupQuery", value = "查询参数", paramType = "query")
    })
    Result<List<GysGroupVO>> selectGroupTree(GysGroupQuery gysGroupQuery);
}

